package android.longs.study.home.servlet.model;

import static org.junit.Assert.*;

import java.util.UUID;

import org.hibernate.Session;
import org.junit.Test;

import android.longs.study.utils.H3Utils;

public class HomeModelTest3 {

    @Test
    public void add() {
	MobleHomeModel model = new MobleHomeModel();
	model.uid = UUID.randomUUID().toString();
	model.name = " java html and ios ";
	model.createTime = System.currentTimeMillis()+"";

	Session session = H3Utils.getCurrentSession();
	session.beginTransaction();
	//保存 
	//当执行save方法的时候 会
	session.save(model);

	session.getTransaction().commit();
    }

}
